var prefix = ctx + "system/main"


$(document).ready(function(){
});

function queryMessageList() {
    var columns = [{
        checkbox: true
    },
        {
            field: 'id',
            title: '消息ID'
        },
        {
            field: 'title',
            title: '标题'
        },
        {
            field: 'realName',
            title: '推送用户'
        },
        {
            field: 'updateTime',
            title: '最近修改时间'
        },
        {
            title: '操作',
            align: 'center',
            formatter: function(value, row, index) {
                var actions = [];
                actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="show(\'' + row.id + '\')"><i class="fa fa-edit"></i>查看详情</a> ');
                return actions.join('');
            }
        }];
    var url = prefix + "/list";
    $.initTableParams(columns, url, queryParams);
}

function queryParams(params) {
    return {
        // 传递参数查询参数
        pageSize:       params.limit,
        pageNum:        params.offset / params.limit + 1,
        searchValue:    params.search,
        orderByColumn:  params.sort,
        isAsc:          params.order,
    };
}